
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
    <title>问题列表</title>
    <script src="https://libs.baidu.com/jquery/2.0.0/jquery.min.js"></script>
    <link rel="stylesheet" href="https://jzcloud.jiruan.ltd/web_view/css/style.css">
</head>
<body>

<div>


    <?php foreach($data as $key=>$value){ ?>
    <a class="questlist ruluelist">
        <div class="questname   ">
            <img src="http://jzcloud.jiruan.ltd/web_view/img/wen.png">
            <span class="ov1"><?php echo $value['question'] ?></span>
        </div>
        <div class="questioncon" >
            <?php echo $value['answer'] ?>
        </div>
    </a>
    <?php } ?>
</div>
<script>
    $('.questname').click(function () {
        $(this).toggleClass('on')
        $(this).next('.questioncon').slideToggle()
    })
</script>
</body>
</html>